Release 10.1A: OpenEdge Development:
Progress 4GL Reference


MERGE-CHANGES( ) method

Merges the changed rows from a ProDataSet object loaded with the GET-CHANGES( ) method into the corresponding rows in either a single temp-table or all temp-tables in the original ProDataSet object.

Return type: LOGICAL

Applies to: Buffer object handle, ProDataSet object handle

Syntax
change-handle:MERGE-CHANGES( original-handle [, copy-all-mode ] ) 

change-handle

A handle to the ProDataSet object or ProDataSet temp-table buffer that contains the changed rows.

original-handle

A handle to the original ProDataSet object or ProDataSet temp-table buffer to merge with the changed rows.

copy-all-mode

An optional logical expression where TRUE indicates that Progress merge rows in a copy-all mode. When TRUE, Progress merges all after-image table rows whether or not they contain changes. In this case, the temp-table in the original ProDataSet object must have a unique primary index that Progress can use to find each corresponding row from the after-image table (since unchanged rows do not have a corresponding row in the before-image table). When a corresponding row is not found in the original ProDataSet object, Progress creates a new row using the row from the after-image table. When FALSE, Progress merges only after-image table rows that contain changes. The default value is FALSE.

For a ProDataSet object handle, all modified tables in the ProDataSet object are merged. For a Buffer object handle, only the temp-table associated with that buffer is merged.

If the ERROR attribute or REJECTED attribute for a changed table is TRUE, the MERGE-CHANGES( ) method backs out the changes. Otherwise, this method accepts the changes by copying the after-image table rows to the corresponding after-image table rows in the original ProDataSet temp-table. Progress also sets the BEFORE-ROWID attribute of the row in the after-image table to the Unknown value (?), sets the ROW-STATE of the row in the after-image table to ROW-UNMODIFIED (0), and removes the before-image table row (if it has one).


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095